package main

import "fmt"

func removeDuplicates(nums []int) int {
	idx := 0
	for i := 1; i < len(nums); i++ {
		if nums[i] != nums[idx] {
			idx = idx + 1
			fmt.Println(i, idx)
			nums[idx] = nums[i]
		}
	}
	return idx + 1

}

func main() {
	var a []int = []int{1, 1, 2}
	lens := removeDuplicates(a)
	fmt.Println(lens)
}
